﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="Main.aspx.cs" Inherits="Pictures_Main" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
     
     
     <asp:DataList ID="DataList1" runat="server" DataSourceID="PhotoDS" DataKeyField="PhotoID" RepeatColumns="5" RepeatDirection="Horizontal">
        <ItemTemplate>
            <a href='<%# Eval("Filename", "./../Gallery/{0}") %>' target="_blank">
                <asp:Image ID="Image1" runat="server" Height="50" Width="50" ImageUrl='<%# Eval("Filename", "./../Gallery/{0}") %>' 
                ToolTip='<%# Eval("Memo") %>' />
            </a>
        </ItemTemplate>
     </asp:DataList>
     <br />
         
     <asp:SqlDataSource ID="PhotoDS" runat="server" ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>"
        SelectCommand="SELECT [PhotoID], [Filename], [CategoryID], [Memo] FROM [Photo] WHERE ([CategoryID] = @categoryID)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="CategoryID" QueryStringField="Category"
                Type="Decimal" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

